/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package seres;

/**
 *
 * @author Doreley Hernandez
 */
public abstract class Guerrero extends SerVivo {

    public Guerrero(String soy) {
        blanco = generaBlanco();
        this.soy = soy; 
    }

    public int dispara() {
        if (vivo) {
            int disparo = ((int) (Math.random() * 10));
            System.out.println(soy + "Dispara nº " + disparo);
            return disparo;
        } else {
            return 100;
        }
    }

    public int getBlanco() {
        return blanco;
    }

    private int generaBlanco() {
        return ((int) (Math.random() * 10));
    }

    public abstract void recibeDisparo(int i);
    protected int blanco;
    protected final String soy;
}
